class DocumentFullTextViewModel:
    def __init__(self, data):
        # 'id', 'order_number', 'sentence_index', 'path', 'content', 'is_similar', 'rate', 'suggest'
        self.order_number = data.order_number
        self.id = data.id
        self.sentence_index = data.sentence_index
        self.path = data.path
        self.content = data.content
        self.is_similar = data.is_similar
        self.rate = data.rate


class DocumentFullTextListView:
    def __init__(self):
        self.code = 0
        self.msg = ''
        self.data = []

    def fill(self, data):
        self.code = 0
        self.msg = ''
        self.count = data.total
        self.data = [DocumentFullTextViewModel(item) for item in data.items]


class PasteFullTextViewModel:
    def __init__(self, data):
        # 'id', 'order_number', 'sentence_index', 'path', 'content', 'is_similar', 'rate', 'suggest'
        self.order_number = data.order_number
        self.id = data.id
        self.sentence_index = data.sentence_index
        self.paragraph_index = data.paragraph_index
        self.content = data.content
        self.is_similar = data.is_similar
        self.rate = data.rate


class PasteFullTextListView:
    def __init__(self):
        self.code = 0
        self.msg = ''
        self.data = []

    def fill(self, data):
        self.code = 0
        self.msg = ''
        self.count = data.total
        self.data = [PasteFullTextViewModel(item) for item in data.items]

